package java67_7;

public class Suiji {

	public static void main(String[] args) {
		// 产生0-1000之间的整数,怎么办?

		System.out.println(Math.random());
		int r = (int) (Math.random() * 1000);
		System.out.println(r);
		// 1000-9999之间的整数
		int r2 = (int) (Math.random() * 9000 + 1000);

		// (int) (Math.random() * 10000);
		System.out.println(r2);
	}

}
